/*
 * @Author: shiguo
 * @Date: 2022-04-24 14:10:04
 * @LastEditors: shiguo
 * @LastEditTime: 2023-03-23 11:13:55
 * @FilePath: /aks-fire-app/node_modules/@aks-dev/easyui/lib/Hud/Hud.tsx
 */
import * as React from 'react'
// import { StyleSheet } from 'react-native'
import {
    alertViewRef, default as AlertView, showAlertModal
} from './AlertView/AlertView'

import {
    alertBottomViewRef, default as AlertBottomView, showAlertBottomModal
} from './AlertBottomView/AlertBottomView'
import {
    alertSheetViewRef, default as AlertSheetView, showAlertSheetModal
} from './AlertSheetView/AlertSheetView'

import {
    hideLoading, Loading, loadingRef, showLoading
} from './Loading/Loading'


import {
    showToast, Toast, toastRef
} from './Toast/Toast'


import { showPopoverView, hidePopoverView, popoverViewRef, PopoverView } from './PopoverView/PopoverView'


import {
    showScanner, hideScanner, scannerRef, Scanner
} from './Scanner/Scanner'




export const Hud: React.FC<{}> = () => React.cloneElement(
    <></>,
    {
        // ...StyleSheet.absoluteFillObject,
        // display: 'flex',
    },
    [
        <Loading key="hud-0" ref={loadingRef} />,
        <Toast key="hud-1" ref={toastRef} />,
        <AlertView key="hud-2" ref={alertViewRef} />,
        <AlertBottomView key="hud-3-0" ref={alertBottomViewRef} />,
        <AlertSheetView key="hud-3-1" ref={alertSheetViewRef} />,
        <PopoverView key="hud-4" ref={popoverViewRef} />,
        <Scanner key="hud-5" ref={scannerRef} />,
    ]
)


export {
    showAlertModal,
    showToast,
    showLoading, hideLoading,
    showAlertBottomModal,
    showAlertSheetModal,
    showPopoverView, hidePopoverView,
    showScanner,hideScanner,
}
